﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Fluent="clr-namespace:Fluent" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="pack://application:,,,/Fluent;component\Themes\Office2010\Controls\ScrollBarWhite.xaml"/>
    <ResourceDictionary Source="pack://application:,,,/Fluent;component\Themes\Office2010\Controls\TextBox.xaml"/>
    <ResourceDictionary Source="pack://application:,,,/Fluent;component\Themes\Office2010\Controls\RibbonScrollViewer.xaml"/>
  </ResourceDictionary.MergedDictionaries>
  <Fluent:ObjectToImageConverter x:Key="StringToImageConvert"/>
  <Style x:Key="RibbonComboButtonStyle" TargetType="{x:Type Fluent:ToggleButton}">
    <Setter Property="Template" Value="{DynamicResource RibbonComboButtonControlTemplate}"/>
    <Setter Property="Height" Value="66"/>
    <Setter Property="Width" Value="Auto"/>
    <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}"/>
    <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}"/>
    <Setter Property="Foreground" Value="{DynamicResource DefaultFontBrush}"/>
    <Setter Property="FocusVisualStyle" Value="{DynamicResource ControlStyleEmptyFocus}"/>
  </Style>
  <ControlTemplate x:Key="RibbonComboButtonControlTemplate" TargetType="{x:Type Fluent:ToggleButton}">
    <Border x:Name="border" BorderThickness="1" CornerRadius="0" Background="{DynamicResource ButtonBackgroundBrush}" BorderBrush="{DynamicResource ButtonBorderBrush}" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
      <Border x:Name="border1" Height="Auto" BorderBrush="{DynamicResource TransparentBrush}" BorderThickness="1" CornerRadius="0" Background="{DynamicResource TransparentBrush}">
        <Grid Height="Auto">
          <Rectangle x:Name="rectangle" StrokeThickness="0" Visibility="Collapsed">
            <Rectangle.Fill>
              <RadialGradientBrush Center="0.503,1" GradientOrigin="0.503,1" RadiusY="0.202">
                <GradientStop Color="#7FFFFFFF" Offset="0"/>
                <GradientStop Offset="1"/>
              </RadialGradientBrush>
            </Rectangle.Fill>
          </Rectangle>
        </Grid>
      </Border>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource ButtonPressedOuterBorderBrush}"/>
        <Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonPressedOuterBackgroundBrush}"/>
        <Setter Property="Background" TargetName="border1" Value="{DynamicResource ButtonPressedInnerBackgroundBrush}"/>
        <Setter Property="BorderBrush" TargetName="border1" Value="{DynamicResource ButtonPressedInnerBorderBrush}"/>
      </Trigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource ButtonPressedOuterBorderBrush}"/>
        <Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonPressedInnerBorderBrush}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">

      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsMouseOver" Value="True"/>
          <Condition Property="IsPressed" Value="False"/>
          <Condition Property="IsChecked" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="BorderBrush" TargetName="border1" Value="{DynamicResource ButtonHoverInnerBorderBrush}"/>
        <Setter Property="Background" TargetName="border1" Value="{DynamicResource ButtonHoverInnerBackgroundBrush}"/>
        <Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonHoverOuterBackgroundBrush}"/>
        <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource ButtonHoverOuterBorderBrush}"/>
        <Setter Property="Visibility" TargetName="rectangle" Value="Visible"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <GroupStyle x:Key="ComboBoxGroupStyle">
    <GroupStyle.ContainerStyle>
      <Style TargetType="{x:Type GroupItem}">
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type GroupItem}">
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid Height="21" Background="#FFF0F2F5" Grid.ColumnSpan="2" VerticalAlignment="Top">
                  <TextBlock Margin="7,0" Text="{Binding Name}" VerticalAlignment="Center" HorizontalAlignment="Left" FontWeight="Bold" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis"/>
                </Grid>
                <Image Grid.Column="0" Stretch="None" Margin="4,21,4,0" VerticalAlignment="Top" HorizontalAlignment="Center" x:Name="iconImage">
                  <Image.Source>
                    <MultiBinding Converter="{StaticResource GroupIconConverter}">
                      <Binding Path="Items"/>
                      <Binding ElementName="layoutRoot"/>
                    </MultiBinding>
                  </Image.Source>
                </Image>
                <Path Fill="{x:Null}" Stretch="Fill" Stroke="#FFE2E4E7" HorizontalAlignment="Right" Width="1" Height="Auto" Data="M0,0L0,1" Visibility="Visible" x:Name="menuLine" Margin="0,21,0,0"/>
                <ItemsPresenter Grid.Column="1" Margin="0,21,0,0"/>
              </Grid>
              <ControlTemplate.Triggers>
                <Trigger SourceName="iconImage" Property="Source" Value="{x:Null}">
                  <Setter TargetName="menuLine" Property="Visibility" Value="Collapsed"/>
                  <Setter TargetName="iconImage" Property="Visibility" Value="Collapsed"/>
                </Trigger>
              </ControlTemplate.Triggers>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>
    </GroupStyle.ContainerStyle>
  </GroupStyle>
  <Style TargetType="{x:Type Fluent:ComboBox}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Fluent:ComboBox}">
          <ControlTemplate.Resources>
            <ResourceDictionary>
              <Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource ScrollBarWhite}"/>
              <Style x:Key="{x:Type ScrollViewer}" TargetType="{x:Type ScrollViewer}" BasedOn="{StaticResource ScrollViewerStyle}"/>
            </ResourceDictionary>
          </ControlTemplate.Resources>
          <Border Width="Auto" Background="#00000000" Height="22">
            <Grid Width="Auto" Height="Auto" Background="#00000000">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <StackPanel Orientation="Horizontal" Grid.ColumnSpan="1" x:Name="stackPanel" HorizontalAlignment="Stretch" Margin="0,0,4,0">
                <ContentPresenter x:Name="iconImage" Width="16" Height="16" VerticalAlignment="Center" Margin="3,0,0,0" Content="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource StringToImageConvert}}"/>
                <TextBlock Text="{TemplateBinding Header}" TextWrapping="Wrap" VerticalAlignment="Center" Margin="5,0,0,0" x:Name="textBlock"/>
              </StackPanel>

              <Border Height="Auto" BorderThickness="1,1,1,1" BorderBrush="{DynamicResource TextBoxBorderBrush}" x:Name="PART_ContentBorder" Background="{DynamicResource TextBoxBackgroundBrush}" Grid.Column="1" Grid.ColumnSpan="1" Width="{TemplateBinding InputWidth}" d:LayoutOverrides="GridBox" HorizontalAlignment="Right">
                <Grid>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="13"/>
                  </Grid.ColumnDefinitions>
                  <Border Grid.ColumnSpan="1" Grid.Column="1" BorderThickness="1,0,0,0" BorderBrush="{DynamicResource TextBoxHoverBorderBrush}" Visibility="Collapsed" x:Name="border1" Background="{DynamicResource TextBoxBackgroundBrush}"/>
                  <Fluent:ToggleButton IsDefinitive="False" x:Name="ToggleButton" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"  Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" Margin="0,-1,-1,-1" Style="{DynamicResource RibbonComboButtonStyle}" Opacity="0" CanAddToQuickAccessToolBar="False"/>
                  <ContentPresenter Margin="3" x:Name="PART_ContentSite" IsHitTestVisible="False" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" VerticalAlignment="Top" HorizontalAlignment="Left" />
                  <Image Margin="0" Stretch="None" x:Name="PART_SelectedImage" IsHitTestVisible="False" VerticalAlignment="Top" HorizontalAlignment="Left" Visibility="Collapsed" Width="Auto" Height="Auto"/>
                  <TextBox Focusable="True" x:Name="PART_EditableTextBox" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextWrapping="NoWrap" BorderThickness="0,0,0,0" IsReadOnly="{TemplateBinding IsReadOnly}" Background="{DynamicResource TextBoxBackgroundBrush}" Visibility="Hidden"/>
                  <Path x:Name="path" Grid.Column="1" Data="M0,0L2,0 1,1z" Fill="{DynamicResource DefaultFontBrush}" Margin="0" StrokeStartLineCap="Round" Stretch="Fill" StrokeEndLineCap="Round" Stroke="{DynamicResource DefaultFontBrush}" StrokeThickness="1" StrokeMiterLimit="10" StrokeLineJoin="Round" Width="5" Height="4" StrokeDashCap="Round" IsHitTestVisible="False"/>
                </Grid>
              </Border>
              <Popup
                x:Name="PART_Popup"
                Placement="Bottom"
                PlacementTarget="{Binding ElementName=PART_ContentBorder}"
                IsOpen="{TemplateBinding IsDropDownOpen}"
                AllowsTransparency="True"
                Focusable="False"
                PopupAnimation="Fade" Margin="0,0,-4,0" VerticalAlignment="Top" Grid.ColumnSpan="2">
                <Popup.Resources>
                  <ResourceDictionary>
                    <Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource ScrollBarWhite}"/>
                  </ResourceDictionary>
                </Popup.Resources>
                <Grid
                  Name="DropDown"
                  SnapsToDevicePixels="True" Margin="0" VerticalAlignment="Top">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="10"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="10"/>
                  </Grid.ColumnDefinitions>
                  <Rectangle HorizontalAlignment="Left" VerticalAlignment="Top" Width="4" Height="4" Grid.Row="1" Grid.Column="1" StrokeThickness="0" Margin="-1,-1,0,0">
                    <Rectangle.Fill>
                      <RadialGradientBrush RadiusX="0.984" Center="0.017,0.002" GradientOrigin="0.017,0.002" RadiusY="1">
                        <GradientStop Color="#3F000000" Offset="0"/>
                        <GradientStop Color="#00000000" Offset="1"/>
                      </RadialGradientBrush>
                    </Rectangle.Fill>
                  </Rectangle>
                  <Rectangle StrokeThickness="0" HorizontalAlignment="Left" Margin="-1,3,0,0" VerticalAlignment="Top" Width="4" Height="4" Grid.Column="1" Grid.Row="0">
                    <Rectangle.Fill>
                      <RadialGradientBrush Center="0.032,1.01" GradientOrigin="0.032,1.01" RadiusX="0.984" RadiusY="1">
                        <GradientStop Color="#3F000000" Offset="0"/>
                        <GradientStop Color="#00000000" Offset="1"/>
                      </RadialGradientBrush>
                    </Rectangle.Fill>
                  </Rectangle>
                  <Rectangle StrokeThickness="0" HorizontalAlignment="Left" Margin="3,-1,0,0" VerticalAlignment="Top" Width="4" Height="4" Grid.Column="0" Grid.Row="1">
                    <Rectangle.Fill>
                      <RadialGradientBrush Center="0.996,0.027" GradientOrigin="0.996,0.027" RadiusX="0.984" RadiusY="1">
                        <GradientStop Color="#3F000000" Offset="0"/>
                        <GradientStop Color="#00000000" Offset="1"/>
                      </RadialGradientBrush>
                    </Rectangle.Fill>
                  </Rectangle>
                  <Rectangle StrokeThickness="0" HorizontalAlignment="Stretch" Margin="7,-1,1,0" VerticalAlignment="Top" Width="Auto" Height="4" Grid.Column="0" Grid.Row="1">
                    <Rectangle.Fill>
                      <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox">
                        <GradientStop Color="#3F000000" Offset="0"/>
                        <GradientStop Color="#00000000" Offset="1"/>
                      </LinearGradientBrush>
                    </Rectangle.Fill>
                  </Rectangle>
                  <Rectangle StrokeThickness="0" HorizontalAlignment="Left" Margin="-1,7,0,1" VerticalAlignment="Stretch" Width="4" Height="Auto" Grid.Column="1" Grid.Row="0">
                    <Rectangle.Fill>
                      <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5" MappingMode="RelativeToBoundingBox">
                        <GradientStop Color="#3F000000" Offset="0"/>
                        <GradientStop Color="#00000000" Offset="1"/>
                      </LinearGradientBrush>
                    </Rectangle.Fill>
                  </Rectangle>
                  <Border x:Name="PART_DropDownBorder" MinWidth="{Binding ActualWidth, ElementName=PART_ContentBorder}" SnapsToDevicePixels="True" Background="{DynamicResource ContextMenuBarBackgroundBrush}" BorderBrush="{DynamicResource ContextMenuBarBorderBrush}" BorderThickness="1" CornerRadius="1" Grid.ColumnSpan="1" d:LayoutOverrides="Width, Height" HorizontalAlignment="Stretch" VerticalAlignment="Top">
                    <Grid Width="Auto" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" KeyboardNavigation.DirectionalNavigation="Cycle">
                      <Border VerticalAlignment="Stretch" Width="Auto" Height="Auto" BorderBrush="{DynamicResource ContextMenuBarBackgroundBrush}" BorderThickness="1" CornerRadius="1"/>
                      <Grid Margin="1" HorizontalAlignment="Stretch" VerticalAlignment="Top">
                        <Grid.RowDefinitions>
                          <RowDefinition Height="*"/>
                          <RowDefinition Height="Auto"/>
                          <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Rectangle Fill="{x:Null}" Stretch="Fill" Stroke="#FFE2E4E7" HorizontalAlignment="Left" Margin="24,0,0,0" Width="1" Height="Auto" Grid.RowSpan="2" Visibility="Visible" VerticalAlignment="Stretch"/>
                        <Grid x:Name="PART_MenuPanel" MaxHeight="{TemplateBinding MaxDropDownHeight}" VerticalAlignment="Top">
                          <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                          </Grid.RowDefinitions>
                          <ScrollViewer Focusable="False" BorderBrush="{DynamicResource GalleryBorderBrush}" x:Name="PART_ScrollViewer" Margin="1" SnapsToDevicePixels="True" KeyboardNavigation.DirectionalNavigation="None" VerticalAlignment="Stretch" VerticalScrollBarVisibility="Visible" BorderThickness="0,0,0,1">
                            <Fluent:GalleryPanel x:Name="PART_GalleryPanel" Background="White" ItemContainerGenerator="{Binding ItemContainerGenerator, RelativeSource={RelativeSource TemplatedParent}}" GroupBy="{TemplateBinding GroupBy}" IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="None" ItemHeight="{TemplateBinding ItemHeight}" Orientation="Vertical"/>
                            <!--<StackPanel Background="White" IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="None" Orientation="Vertical"/>-->
                          </ScrollViewer>
                          <ContentPresenter x:Name="menuPresenter" ContentSource="Menu" Grid.Row="1"  KeyboardNavigation.DirectionalNavigation="None" VerticalAlignment="Top"/>                          
                        </Grid>
                        <Border x:Name="resizeBorder" HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="11" BorderBrush="{DynamicResource ContextMenuBarResizeBorderBrush}" BorderThickness="0,1,0,0" Grid.Row="2" CornerRadius="0,0,1,1" Background="{DynamicResource ContextMenuBarResizeBackgoundBrush}">
                          <Grid>
                            <Thumb x:Name="PART_ResizeVerticalThumb" HorizontalAlignment="Stretch" Margin="0,0,0,-90" Width="Auto" Height="10" VerticalAlignment="Top" Cursor="SizeNS" Template="{DynamicResource ResizeVerticalThumbControlTemplate}"/>
                            <Thumb x:Name="PART_ResizeBothThumb" HorizontalAlignment="Right" Margin="0,0,0,-90" Width="10" Height="10" VerticalAlignment="Top" Cursor="SizeNWSE" Template="{DynamicResource ResizeBothThumbControlTemplate}"/>
                          </Grid>
                        </Border>
                      </Grid>
                    </Grid>
                  </Border>
                </Grid>
              </Popup>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="Menu" Value="{x:Null}">
              <Setter Property="BorderThickness" TargetName="PART_ScrollViewer" Value="0"/>
            </Trigger>
            <Trigger Property="ResizeMode" Value="None">
              <Setter Property="Visibility" TargetName="resizeBorder" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="ResizeMode" Value="Both">
              <Setter Property="Visibility" TargetName="PART_ResizeVerticalThumb" Value="Collapsed"/>
              <Setter Property="Visibility" TargetName="PART_ResizeBothThumb" Value="Visible"/>
              <Setter Property="Visibility" TargetName="resizeBorder" Value="Visible"/>
            </Trigger>
            <Trigger Property="ResizeMode" Value="Vertical">
              <Setter Property="Visibility" TargetName="PART_ResizeBothThumb" Value="Collapsed"/>
              <Setter Property="Visibility" TargetName="PART_ResizeVerticalThumb" Value="Visible"/>
              <Setter Property="Visibility" TargetName="resizeBorder" Value="Visible"/>
            </Trigger>
            <Trigger Property="Icon" Value="{x:Null}">
              <Setter Property="Visibility" TargetName="iconImage" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="InputWidth" Value="NaN">
              <Setter Property="HorizontalAlignment" TargetName="PART_ContentBorder" Value="Stretch"/>
            </Trigger>
            <Trigger Property="Size" Value="Middle">
              <Setter Property="Visibility" TargetName="textBlock" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Size" Value="Small">
              <Setter Property="Visibility" TargetName="stackPanel" Value="Collapsed"/>
            </Trigger>

            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="IsEnabled" TargetName="PART_EditableTextBox" Value="False"/>
              <Setter Property="Background" TargetName="PART_ContentBorder" Value="{DynamicResource TextBoxDisabledBackgroundBrush}"/>
              <Setter Property="BorderBrush" TargetName="PART_ContentBorder" Value="{DynamicResource TextBoxDisabledBorderBrush}"/>
              <Setter Property="BorderBrush" TargetName="border1" Value="{DynamicResource TextBoxDisabledBackgroundBrush}"/>
              <Setter Property="BorderBrush" TargetName="PART_EditableTextBox" Value="{DynamicResource TextBoxDisabledBackgroundBrush}"/>
              <Setter Property="Opacity" TargetName="iconImage" Value="0.5"/>
              <Setter Property="Opacity" TargetName="textBlock" Value="0.5"/>
              <Setter Property="Effect" TargetName="iconImage">
                <Setter.Value>
                  <Fluent:GrayscaleEffect/>
                </Setter.Value>
              </Setter>
              <Setter Property="Opacity" TargetName="path" Value="0.5"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter Property="Visibility" TargetName="border1" Value="Visible"/>
              <Setter Property="BorderBrush" TargetName="PART_ContentBorder" Value="{DynamicResource TextBoxHoverBorderBrush}"/>
              <Setter Property="Background" TargetName="PART_EditableTextBox" Value="{DynamicResource TextBoxHoverBackgroundBrush}"/>
              <Setter Property="Background" TargetName="border1" Value="{DynamicResource TextBoxHoverBackgroundBrush}"/>
              <Setter Property="Background" TargetName="PART_ContentBorder" Value="{DynamicResource TextBoxHoverBackgroundBrush}"/>
              <Setter Property="Opacity" TargetName="ToggleButton" Value="1"/>
            </Trigger>

            <Trigger Property="IsKeyboardFocusWithin" Value="True">
              <Setter Property="Visibility" TargetName="border1" Value="Visible"/>
              <Setter Property="BorderBrush" TargetName="PART_ContentBorder" Value="{DynamicResource TextBoxHoverBorderBrush}"/>
              <Setter Property="Background" TargetName="PART_EditableTextBox" Value="{DynamicResource TextBoxHoverBackgroundBrush}"/>
              <Setter Property="Background" TargetName="border1" Value="{DynamicResource TextBoxHoverBackgroundBrush}"/>
              <Setter Property="Background" TargetName="PART_ContentBorder" Value="{DynamicResource TextBoxHoverBackgroundBrush}"/>
            </Trigger>
            <Trigger Property="HasItems" Value="false">
              <Setter TargetName="PART_DropDownBorder" Property="MinHeight" Value="95"/>
            </Trigger>
            <Trigger Property="IsGrouping" Value="true">
              <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
            </Trigger>
            <Trigger Property="IsEditable"
                     Value="true">
              <Setter Property="IsTabStop" Value="false"/>
              <Setter TargetName="PART_EditableTextBox" Property="Visibility"    Value="Visible"/>
              <Setter TargetName="PART_ContentSite" Property="Visibility" Value="Hidden"/>
            </Trigger>
          </ControlTemplate.Triggers>

        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="FocusVisualStyle" Value="{DynamicResource ControlStyleEmptyFocus}"/>
    <Setter Property="IsEditable" Value="True"/>
    <!--<Setter Property="ItemContainerStyle" Value="{DynamicResource EditableComboBoxItemStyle}"/>-->
    <Style.Triggers>
      <!--<Trigger Property="IsEditable" Value="False">
        <Setter Property="ItemContainerStyle" Value="{DynamicResource NonEditableComboBoxItemStyle}"/>
      </Trigger>-->
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="ItemContainerStyleSelector" Value="{x:Null}"/>
          <Condition Property="IsEditable" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter Property="ItemContainerStyle" Value="{DynamicResource EditableComboBoxItemStyle}"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="ItemContainerStyleSelector" Value="{x:Null}"/>
          <Condition Property="IsEditable" Value="False"/>
        </MultiTrigger.Conditions>
        <Setter Property="ItemContainerStyle" Value="{DynamicResource NonEditableComboBoxItemStyle}"/>
      </MultiTrigger>
    </Style.Triggers>
  </Style>
</ResourceDictionary>